package com.baizhi.cmfz.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * 轮播图
 *
 * @author zhanglh
 * @date 2019/9/11
 */
public class Banner implements Serializable {
    private static final long serialVersionUID = 3449144062429832763L;
    /**
     * 轮播图id
     */
    private Integer bannerId;

    /**
     * 图片路径
     */
    private String bannerImageUrl;

    /**
     * 原有名称
     */
    private String bannerOldName;

    /**
     * 显示状态 1显示 0隐藏
     */
    private int bannerState;

    /**
     * 上传时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime bannerDate;

    /**
     * 描述
     */
    private String bannerDescription;

    public Banner() {}

    public Integer getBannerId() {return this.bannerId;}

    public String getBannerImageUrl() {return this.bannerImageUrl;}

    public String getBannerOldName() {return this.bannerOldName;}

    public int getBannerState() {return this.bannerState;}

    public LocalDateTime getBannerDate() {return this.bannerDate;}

    public String getBannerDescription() {return this.bannerDescription;}

    public void setBannerId(Integer bannerId) {this.bannerId = bannerId; }

    public void setBannerImageUrl(String bannerImageUrl) {this.bannerImageUrl = bannerImageUrl; }

    public void setBannerOldName(String bannerOldName) {this.bannerOldName = bannerOldName; }

    public void setBannerState(int bannerState) {this.bannerState = bannerState; }

    public void setBannerDate(LocalDateTime bannerDate) {this.bannerDate = bannerDate; }

    public void setBannerDescription(String bannerDescription) {this.bannerDescription = bannerDescription; }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Banner)) return false;
        final Banner other = (Banner) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$bannerId = this.getBannerId();
        final Object other$bannerId = other.getBannerId();
        if (this$bannerId == null ? other$bannerId != null : !this$bannerId.equals(other$bannerId)) return false;
        final Object this$bannerImageUrl = this.getBannerImageUrl();
        final Object other$bannerImageUrl = other.getBannerImageUrl();
        if (this$bannerImageUrl == null ? other$bannerImageUrl != null :
                !this$bannerImageUrl.equals(other$bannerImageUrl))
            return false;
        final Object this$bannerOldName = this.getBannerOldName();
        final Object other$bannerOldName = other.getBannerOldName();
        if (this$bannerOldName == null ? other$bannerOldName != null : !this$bannerOldName.equals(other$bannerOldName))
            return false;
        if (this.getBannerState() != other.getBannerState()) return false;
        final Object this$bannerDate = this.getBannerDate();
        final Object other$bannerDate = other.getBannerDate();
        if (this$bannerDate == null ? other$bannerDate != null : !this$bannerDate.equals(other$bannerDate))
            return false;
        final Object this$bannerDescription = this.getBannerDescription();
        final Object other$bannerDescription = other.getBannerDescription();
        if (this$bannerDescription == null ? other$bannerDescription != null : !this$bannerDescription.equals(other$bannerDescription))
            return false;
        return true;
    }

    protected boolean canEqual(final Object other) {return other instanceof Banner;}

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $bannerId = this.getBannerId();
        result = result * PRIME + ($bannerId == null ? 43 : $bannerId.hashCode());
        final Object $bannerImageUrl = this.getBannerImageUrl();
        result = result * PRIME + ($bannerImageUrl == null ? 43 : $bannerImageUrl.hashCode());
        final Object $bannerOldName = this.getBannerOldName();
        result = result * PRIME + ($bannerOldName == null ? 43 : $bannerOldName.hashCode());
        result = result * PRIME + this.getBannerState();
        final Object $bannerDate = this.getBannerDate();
        result = result * PRIME + ($bannerDate == null ? 43 : $bannerDate.hashCode());
        final Object $bannerDescription = this.getBannerDescription();
        result = result * PRIME + ($bannerDescription == null ? 43 : $bannerDescription.hashCode());
        return result;
    }

    public String toString() {return "Banner(bannerId=" + this.getBannerId() + ", bannerImageUrl=" + this.getBannerImageUrl() + ", bannerOldName=" + this.getBannerOldName() + ", bannerState=" + this.getBannerState() + ", bannerDate=" + this.getBannerDate() + ", bannerDescription=" + this.getBannerDescription() + ")";}
}

